home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5404 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: watnews.watson.ibm.com!usenet
  2. From: Guillaume Laurent <glaurent@nissart.lagaude.ibm.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Something to play with.
  5. Date: 08 Feb 1996 11:23:52 +0100
  6. Organization: IBM La Gaude Research Center
  7. Sender: glaurent@nissart.lagaude.ibm.com
  8. Message-ID: <7kka1yf747.fsf@nissart.lagaude.ibm.com>
  9. References: <4eist1$9fk@airdmhor.gen.nz> <31120ED7.5266@ntostud.mh.se>
  10. Reply-To: glaurent@worldnet.net
  11. NNTP-Posting-Host: nissart.lagaude.ibm.com
  12. In-reply-to: Roger Martensson's message of Fri, 02 Feb 1996 13:17:11 +0000
  13. X-Newsreader: Gnus v5.0.4
  14.  
  15. In article <31120ED7.5266@ntostud.mh.se> Roger Martensson <ping9535@ntostud.mh.se> writes:
  16.  
  17. > Simon Hosie wrote:
  18. > > 
  19.  
  20. > >   If anyone gets any kind of warning or error comiling this or anything it
  21. > > generates, please let me know.
  22.  
  23. I didn't get any on AIX 3.2.5 cc.
  24.  
  25. > It compiled quite nice, but it would be nice to know what this
  26. > program does? (Didn't dare to run the program)
  27.  
  28. Well, if I understand correctly (Mr Hosie will correct me if I'm
  29. wrong), it's a kind of compressor, like gzip, called gbcode. What is
  30. special with it is that it can generate C code from a given file. What
  31. for ? you ask. Well, once this very awkward C code is compiled,
  32. running the resulting executable will generate the file you initally
  33. compressed.
  34.  
  35. For instance, let's say you have a file called "foo" :
  36.  
  37. gbcode C foo proto_foo.c ; # Generates a C file like the one Mr Hosie posted, called proto_foo.c
  38.  
  39. cc -o proto_foo proto_foo.c ; # Will create the proto_foo executable
  40.  
  41. <rename foo in foo.org, if still working in the same directory>
  42.  
  43. proto_foo ; # Will recreate the file "foo".
  44.  
  45. What he did was simply to use gbcode on its source and post the
  46. result.
  47.  
  48. Quite elegant, really. Have you ever consider participating the
  49. Obfuscated C Code contest ?
  50. -- 
  51. --
  52.                     Guillaume
  53.  
  54.